Skip to content

docs: Document database exceptions#571

Open
loopassembly wants to merge 2 commits into
serverpod:mainfrom
loopassembly:docs/database-exceptions
Open

docs: Document database exceptions#571
loopassembly wants to merge 2 commits into
serverpod:mainfrom
loopassembly:docs/database-exceptions

Conversation

@loopassembly

Copy link
Copy Markdown

Summary

  • Add a database exceptions page that documents the public Serverpod database exception types.
  • Cover query exception metadata, row-level operation exceptions, and SQLite foreign key integrity checks.
  • Link the CRUD updateById docs to the new exceptions page.

Verification

  • npx --yes --cache ./.npm-cache markdownlint-cli docs/06-concepts/06-database/15-exceptions.md docs/06-concepts/06-database/05-crud.md
  • git diff --check

I did not run a docs build because serverpod_docs/AGENTS.md says not to run build commands locally.

Closes serverpod/serverpod#3281

Copilot AI review requested due to automatic review settings June 3, 2026 08:51
@loopassembly loopassembly changed the title docs: document database exceptions docs: Document database exceptions Jun 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds documentation covering Serverpod database exception types and how to handle them, and links the CRUD guide to this new reference.

Changes:

  • Added a new “Database exceptions” concept page with exception taxonomy and examples.
  • Linked the CRUD updateById section to the new exceptions documentation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
docs/06-concepts/06-database/15-exceptions.md Introduces a new page documenting database exception behavior and types.
docs/06-concepts/06-database/05-crud.md Adds a cross-link from CRUD docs to the new exceptions page.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/06-concepts/06-database/15-exceptions.md
Comment thread docs/06-concepts/06-database/05-crud.md
Comment thread docs/06-concepts/06-database/15-exceptions.md Outdated
@loopassembly

Copy link
Copy Markdown
Author

Thanks for the review notes. I pushed a small follow-up commit (6c60511) to make the database-exception client serialization wording clearer.

I also checked the table and link comments. The table is using normal single-pipe Markdown syntax, and ./exceptions matches the Docusaurus slug for the numbered 15-exceptions.md page. The latest title, markdown-lint, and Docusaurus test-build checks are all green now.

@Swiftaxe Swiftaxe left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A solid concept page! Nice!

Commented on a couple of minor things.

Thank you!

@@ -0,0 +1,92 @@
# Database exceptions

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A convention we just started following is to add a frontmatter description to new pages for SEO.

Suggested change
# Database exceptions
---
description: Serverpod wraps database failures in typed exceptions. Learn when each exception is thrown and how to handle query errors, row-level failures, and SQLite integrity checks.
---
# Database exceptions

Comment thread docs/06-concepts/06-database/05-crud.md
Comment thread docs/06-concepts/06-database/15-exceptions.md
Comment thread docs/06-concepts/06-database/15-exceptions.md Outdated
@@ -0,0 +1,92 @@
# Database exceptions

Serverpod wraps database failures in exceptions that implement `DatabaseException`.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every line hard-wraps at 72 characters. Remove to match the rest of the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document database exceptions

3 participants